home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness: Critical Thinking Skills / Workplace Effectiveness: Critical Thinking Skills.iso / pc / Files / Ability.dxr / 00004_questions code.ls < prev    next >
Encoding:
Text File  |  1998-09-15  |  1.8 KB  |  63 lines

  1. global gAssessmentData, gMasterData
  2.  
  3. on questionNext
  4.   set vQuestion to the questionNum of gAssessmentData
  5.   if vQuestion < 49 then
  6.     set vQuestion to vQuestion + 1
  7.     set the questionNum of gAssessmentData to vQuestion
  8.     nextQuest()
  9.     if vQuestion = 49 then
  10.       set the member of sprite 3 to member "go on text"
  11.       goNarrator(gMasterData, "09a")
  12.     end if
  13.   end if
  14. end
  15.  
  16. on questionPrev
  17.   set vQuestion to the questionNum of gAssessmentData
  18.   if vQuestion > 1 then
  19.     set vQuestion to vQuestion - 1
  20.     set the questionNum of gAssessmentData to vQuestion
  21.     nextQuest()
  22.     if vQuestion = 48 then
  23.       set the member of sprite 3 to member "instructions"
  24.     end if
  25.   end if
  26. end
  27.  
  28. on nextQuest
  29.   set the member of sprite the artSprite of gAssessmentData to member ("questArt" & the questionNum of gAssessmentData)
  30.   resetIndicator()
  31.   updateStage()
  32. end
  33.  
  34. on setIndicator vNumber
  35.   puppetSprite(the triangleSp of gAssessmentData, 1)
  36.   set setPoints to [point(83, 299), point(135, 299), point(187, 299), point(240, 299), point(294, 299), point(346, 299), point(402, 299), point(454, 299), point(507, 299), point(559, 299)]
  37.   set the loc of sprite the triangleSp of gAssessmentData to getAt(setPoints, vNumber)
  38.   setAt(the clickChoices of gAssessmentData, the questionNum of gAssessmentData, vNumber)
  39. end
  40.  
  41. on resetIndicator
  42.   set vUserChoice to getAt(the clickChoices of gAssessmentData, the questionNum of gAssessmentData)
  43.   if vUserChoice = 0 then
  44.     puppetSprite(the triangleSp of gAssessmentData, 0)
  45.   else
  46.     setIndicator(vUserChoice)
  47.   end if
  48. end
  49.  
  50. on cipherNgwan
  51.   set vTotalZeros to 0
  52.   repeat with x in the clickChoices of gAssessmentData
  53.     if x = 0 then
  54.       set vTotalZeros to vTotalZeros + 1
  55.     end if
  56.   end repeat
  57.   if vTotalZeros > 25 then
  58.     alert("You have not answered enough questions to continue this activity.")
  59.   else
  60.     goresults()
  61.   end if
  62. end
  63.